home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / Xi / XQueryDeviceState.z / XQueryDeviceState
Encoding:
Text File  |  1998-10-30  |  4.4 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXQQQQuuuueeeerrrryyyyDDDDeeeevvvviiiicccceeeeSSSSttttaaaatttteeee((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXQQQQuuuueeeerrrryyyyDDDDeeeevvvviiiicccceeeeSSSSttttaaaatttteeee((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XQueryDeviceState - query the state of an extension input
  10.           device.
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           XQueryDeviceState(_d_i_s_p_l_a_y, _d_e_v_i_c_e)
  14.                 Display *_d_i_s_p_l_a_y;
  15.                 XDevice *_d_e_v_i_c_e;
  16.  
  17.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  18.           _d_i_s_p_l_a_y     Specifies the connection to the X server.
  19.  
  20.           _d_e_v_i_c_e      Specifies the device whose state is to be
  21.                       queried.
  22.  
  23.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.           The _X_Q_u_e_r_y_D_e_v_i_c_e_S_t_a_t_e request queries the state of an input
  25.           device.  The current state of keys and buttons (up or down),
  26.           and valuators (current value) on the device is reported by
  27.           this request.  Each key or button is represented by a bit in
  28.           the _X_D_e_v_i_c_e_S_t_a_t_e structure that is returned.  Valuators on
  29.           the device report 0 if they are reporting relative
  30.           information, and the current value if they are reporting
  31.           absolute information.
  32.  
  33.           _X_Q_u_e_r_y_D_e_v_i_c_e_S_t_a_t_e can generate a _B_a_d_D_e_v_i_c_e error.
  34.  
  35.      SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
  36.           The _X_D_e_v_i_c_e_S_t_a_t_e structure contains:
  37.  
  38.           typedef struct {
  39.                XID device_id;
  40.                int num_classes;
  41.                XInputClass *data;
  42.           } XDeviceState;
  43.  
  44.           The _X_V_a_l_u_a_t_o_r_S_t_a_t_e structure contains:
  45.  
  46.           typedef struct {
  47.                unsigned char class;
  48.                unsigned char length;
  49.                unsigned char num_valuators;
  50.                unsigned char mode;
  51.                int *valuators;
  52.           } XValuatorState;
  53.  
  54.           The _X_K_e_y_S_t_a_t_e structure contains:
  55.  
  56.           typedef struct {
  57.                unsigned char class;
  58.                unsigned char length;
  59.                short         num_keys;
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXQQQQuuuueeeerrrryyyyDDDDeeeevvvviiiicccceeeeSSSSttttaaaatttteeee((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXQQQQuuuueeeerrrryyyyDDDDeeeevvvviiiicccceeeeSSSSttttaaaatttteeee((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.                char keys[32];
  75.           } XKeyState;
  76.  
  77.           The _X_B_u_t_t_o_n_S_t_a_t_e structure contains:
  78.  
  79.           typedef struct {
  80.                unsigned char class;
  81.                unsigned char length;
  82.                short         num_buttons;
  83.                char buttons[32];
  84.           } XButtonState;
  85.  
  86.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  87.           _B_a_d_D_e_v_i_c_e   An invalid device was specified.  The specified
  88.                       device does not exist or has not been opened by
  89.                       this client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.  This error
  90.                       may also occur if some other client has caused
  91.                       the specified device to become the X keyboard or
  92.                       X pointer device via the _X_C_h_a_n_g_e_K_e_y_b_o_a_r_d_D_e_v_i_c_e
  93.                       or _X_C_h_a_n_g_e_P_o_i_n_t_e_r_D_e_v_i_c_e requests.
  94.  
  95.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  96.           _P_r_o_g_r_a_m_m_i_n_g _w_i_t_h _X_l_i_b
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.